<div class="col-md-3 col-sm-12 col-xs-12 paddingl0">
	<div class="siderbar-waper">
		<!-- 侧边栏 -->
		<div class="widgets clearfix">
			<h2 class="title">博文搜索</h2>
			<div style="padding:10px 0px;">
				<form class="form-inline" action="{:url('index/search')}" method="get">
					<div class="form-group">
						<label class="sr-only" for=""></label>
						<input type="text" name="keyword" value="" class="form-control form-control-self" placeholder="关键词">
					</div>
					<button type="submit" class="btn btn-info">搜一搜</button>
				</form>
			</div>
		</div>

		<div class="widgets clearfix">
			<h2 class="title">博文推荐</h2>
			<ul class="ranks">
				 
			</ul>
		</div>
	</div>

</div>
<script type="text/javascript">
	$(function(){
		var listsUrl = "{:url('index/lists')}?";
		var detailUrl = "{:url('index/detail')}?";
		//博文推荐
		$.get('{:url("index/getArticles")}',{page:1,isRecommend:1},function(data){
			var list = data.data;
			var html = '';
			if(list.length > 0){
				for(var i = 0;i < list.length;i++){
						
					html+= '<li>';
						if (list[i].img){
							html+='<div class="thumbs"><a href="'+ detailUrl +'id=' + list[i].id + '&cid=' + list[i].cid + '"><img class="thumb" src="'+ list[i].img +'90_64.jpg" alt="' + list[i].title + '"></a></div>'
						}
						
						html+='<div class="text">'
						+'<div><a href="'+ detailUrl +'id=' + list[i].id + '&cid=' + list[i].cid + '" title="' + list[i].title + '">' + list[i].title + ' </a></div>'
						+'<span class="muteds">' + list[i].addTime + '</span>'
						+'</div>'
						+'</li>';
						 
				}
				$('.ranks').html(html);
					 
			}
		
		
		});
		
		
	});

 
</script>

